package web;

import java.io.Serializable;
import java.util.List;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import service.ModuloSistemaService;
import entity.ModuloSistema;

@Controller
@Scope("view")
public class ModuloSistemaMBean extends BaseManagedBean implements Serializable {

	private static final long serialVersionUID = 7863504781978243773L;

	private List<ModuloSistema> listaModulos;

	@Autowired
	private ModuloSistemaService moduloSistemaService;

	@PostConstruct
	protected void inicializar() {
		listaModulos = moduloSistemaService.listarAtivos();
	}

	public List<ModuloSistema> getListaModulos() {
		return listaModulos;
	}

}
